<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>

<head>
    <title>襄阳蓝芯智能化办公系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="${pageContext.request.contextPath}/static/bootstrap-3.3.5/css/bootstrap.css" rel="stylesheet">
    <style>
        .thead-blue {
            color: #fff;
            font-weight: bold;
            background-color: #337ab7;
        }
    </style>
</head>
<body>

<div class="panel panel-primary">
    <table class="table table-bordered table-hover">
        <thead>
        <tr class="thead-blue">
            <td colspan="4">资产详情</td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="col-md-2"><label>资产编号</label></td>
            <td class="col-md-4">${zcAsset.assetCode}</td>
            <td class="col-md-2"><label>序列号</label></td>
            <td class="col-md-4">${zcAsset.assetNumber}</td>
        </tr>
        <tr>
            <td><label>资产名称</label></td>
            <td>${zcAsset.assetName}</td>
            <td><label>资产类别</label></td>
            <td>
                ${zcAssettype.typeName}
            </td>
        </tr>
        <tr>
            <td><label>资产规格</label></td>
            <td>${zcAsset.guige}</td>
            <td><label>生产日期</label></td>
            <td><fmt:formatDate value="${produceDate}" pattern="yyyy-MM-dd"/></td>
        </tr>
        <tr>
            <td><label>存放地</label></td>
            <td>
               ${jcBasicdatavalue1.name}
            </td>
            <td><label>库管</label></td>
            <td>${zcEmployee.empName}</td>
        </tr>
        <tr>
            <td><label>价格</label></td>
            <td>${zcAsset.price}</td>
            <td><label>入库时间</label></td>
            <td><fmt:formatDate value="${regDate}" pattern="yyyy-MM-dd"/></td>
        </tr>
        <tr>
            <td><label>资产来源</label></td>
            <td>
                ${jcBasicdatavalue.name}
            </td>
            <td><label>数量</label></td>
            <td>${zcAsset.amount}</td>
        </tr>
        <tr>
            <td><label>创建时间</label></td>
            <td><fmt:formatDate value="${createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <td><label>经办人</label></td>
            <td>${zcJinban.empName}</td>
        </tr>
        <tr>
            <td><label>状态</label></td>
            <td colspan="3">
                <c:choose>
                    <c:when test="${zcAsset.status == 'Y'}">闲置</c:when>
                    <c:when test="${zcAsset.status == 'U'}">使用中</c:when>
                    <c:when test="${zcAsset.status == 'N'}">已报废</c:when>
                    <c:otherwise>未知状态</c:otherwise>
                </c:choose>
            </td>
        </tr>
        <tr>
            <td><label>备注</label></td>
            <td colspan="3">${zcAsset.remark}</td>
        </tr>
        <tr>
            <td colspan="4" align="center">
                <a type="button" href="javascript:history.back()" class="btn btn-info">返回</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>

<script type="text/javascript">
    $(document).ajaxError(function(event,xhr) {
        if(xhr.status=="403"){
            document.location.href = xhr.getResponseHeader("url");
        }else if(xhr.status!="200"){
            console.log("服务器错误!");
        }
    });
</script>
</body>
</html>